import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';

const { apiUrl = '' } = useGlobSetting();

enum Api {
  getGraphData = '/genealogy/patentGraph/getGraphData',
  calculateImportance = '/genealogy/patentGraph/calculateImportance',
  getPatentDetail = '/genealogy/patentGraph/getPatentDetail',
}

/**
 * 获取专利谱系图数据
 */
export const getPatentGraphData = (params) =>
  defHttp.get({ url: Api.getGraphData, params }, { isTransformResponse: false });

/**
 * 计算专利重要性评分
 */
export const calculatePatentImportance = (params) =>
  defHttp.get({ url: Api.calculateImportance, params }, { isTransformResponse: false });

/**
 * 获取专利详细信息
 */
export const getPatentDetail = (params) =>
  defHttp.get({ url: Api.getPatentDetail, params }, { isTransformResponse: false });


